package main

import (
	"api-gateway-center/config"
	"api-gateway-center/interfaces"
	"api-gateway-center/interfaces/middleware"
	"fmt"
	"github.com/gin-gonic/gin"
	"github.com/spf13/viper"
)

func main() {
	config.ConfInit()
	router := gin.Default()
	router.Use(middleware.Cors())
	interfaces.NewRpcRegisterManageController().RpcRegisterManage(router)
	interfaces.NewGatewayConfigManageController().GatewayConfigManage(router)
	router.Run(fmt.Sprintf(":%s", viper.GetString("server.port")))
}
